//
//  ChangePhoneControl.m
//  FreeTime
//
//  Created by  on 16/8/26.
//  Copyright © 2016年 SRDZ.com. All rights reserved.
//

#import "ChangePhoneControl.h"
#import "Header.h"
@interface ChangePhoneControl ()

@end

@implementation ChangePhoneControl

- (void)viewDidLoad {
    [super viewDidLoad];
    [self setupNav];
    [self setupUI];
}
#pragma mark -- selfStyle --
- (void)setupUI{
    self.navigationItem.title = @"修改电话号码";
    NSArray * arr = @[@"请输入您的手机号",@"请输入您的验证码"];
    CGFloat y = 0;
    for (int i =0; i<arr.count; i++) {
        UITextField * tf = [[UITextField alloc] initWithFrame:CGRectMake(10, 5+i*44, WindowWidth-20, 44)];
        if (i == 0) {
            UIButton * sendCode = [UIButton buttonWithType:UIButtonTypeSystem];
            sendCode.frame = CGRectMake((WindowWidth-20)/3*2+1, 0, (WindowWidth-20)/3, 44);
//            sendCode.backgroundColor = DEBUG_CLOLR;
            sendCode.titleLabel.font = FONT(12);
            [sendCode setTitle:@"发送验证码" forState:UIControlStateNormal];
            [sendCode setTitleColor:[ImageUtil colorWithRgb:0x666666] forState:UIControlStateNormal];
            tf.delegate = self;
            [tf addSubview:sendCode];
            
            [ToolUtil createVerticalLine:6 superView:tf lift:(WindowWidth-20)/3*2 height:25 color:[ImageUtil colorWithRgb:0xe6e6e6]];
            
        }
        tf.borderStyle = UITextBorderStyleNone;
        tf.font = FONT(14);
        [ToolUtil createLine:40 superView:tf lift:0 width:WindowWidth-20 hight:1 color:[ImageUtil colorWithRgb:0xcccccc]];
        tf.placeholder = arr[i];
        [self.view addSubview:tf];
        y = CGRectGetMaxY(tf.frame);
    }
    UIButton * enterBtn = [UIButton buttonWithType:UIButtonTypeCustom];
    enterBtn.frame = CGRectMake(60, y+45, WindowWidth-120, 44);
    [enterBtn addTarget:self action:@selector(enterBtn) forControlEvents:UIControlEventTouchUpInside];
//    enterBtn.backgroundColor = DEBUG_CLOLR;

    [enterBtn setBackgroundImage:[UIImage imageNamed:@"querenbiao"] forState:UIControlStateNormal];
    UILabel * titleLbl = [ReduceCode creatLabelWithFrame:CGRectMake((WindowWidth-120-80)/2, 0, 80, 40) title:@"验证" titleColor:[UIColor whiteColor] font:14 textAlignment:1];
    [enterBtn addSubview:titleLbl];
//    [enterBtn setTitle:@"验证" forState:UIControlStateNormal];
//    [enterBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
    enterBtn.titleLabel.font = FONT(17);
    [self.view addSubview:enterBtn];
    
    

}
#pragma mark -- 响应事件 --
- (void)enterBtn{

}

@end
